<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>Test (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">testing.ContinuationTestCase.Test</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_testing_TestCase_Test.html">
          goog.testing.TestCase.Test
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Creates a continuation test case, which consists of multiple test steps that
occur in several phases.

The steps are distributed between setUp, test, and tearDown phases. During
the execution of each step, 0 or more steps may be added to the current
phase. Once all steps in a phase have completed, the next phase will be
executed.

If any errors occur (such as an assertion failure), the setUp and Test phases
will be cancelled immediately. The tearDown phase will always start, but may
be cancelled as well if it raises an error.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="local_closure_goog_testing_continuationtestcase.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/testing/continuationtestcase.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span></td><td></td></tr>
  <tr><td>goog.testing.ContinuationTestCase.Test</td><td><span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.testing.ContinuationTestCase.Test(<span><span class="arg">setUp</span>,&nbsp;<span class="arg">test</span>,&nbsp;<span class="arg">tearDown</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">setUp</span>
        : <span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>
        <div class="entryOverview">A setUp test method to run before
    the main test phase.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">test</span>
        : <span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>
        <div class="entryOverview">A test method to run.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">tearDown</span>
        : <span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>
        <div class="entryOverview">A tearDown test method to run
    after the test method completes or fails.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_ContinuationTestCase_Test.html">
              goog.testing.ContinuationTestCase.Test
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.addStep"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">addStep<span class="args">(<span class="arg">step</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Adds a new test step to the end of the current phase. The new step will wait
for a condition to be met before running, or will fail after a timeout.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">step</span>
        : <span class="type"><a href="class_goog_testing_ContinuationTestCase_Step.html">goog.testing.ContinuationTestCase.Step</a></span>
        <div class="entryOverview">The test step to add.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line563">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.cancelCurrentPhase"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">cancelCurrentPhase<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Cancels all remaining steps in the current phase. Called after an error in
any phase occurs.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line577">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.cancelPhase_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">cancelPhase_<span class="args">(<span class="arg">phase</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Clears a test phase and cancels any pending steps found.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">phase</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>&gt;
        <div class="entryOverview">A list of test steps.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line598">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.cancelTestPhase"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">cancelTestPhase<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Skips the rest of the setUp and test phases, but leaves the tearDown phase to
clean up.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line587">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.getCurrentPhase"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getCurrentPhase<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>&gt;
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="class_goog_testing_TestCase_Test.html">goog.testing.TestCase.Test</a></span>&gt;&nbsp;
            The current phase of steps
   being processed. Returns null if all steps have been completed.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line541">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.getError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getError<span class="args">()</span>
        </span>
        &#8658; <span class="type">Error</span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">Error</span>&nbsp;
            The first error to be raised during the test run or null if
    no errors occurred.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line521">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ContinuationTestCase.Test.prototype.setError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setError<span class="args">(<span class="arg">e</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets an error for the test so it can be reported. Only the first error set
during a test will be reported. Additional errors that occur in later test
phases will be discarded.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">e</span>
        : <span class="type">Error</span>
        <div class="entryOverview">An error.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line532">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_TestCase_Test.html">
              goog.testing.TestCase.Test
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.TestCase.Test.prototype.execute"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">execute<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Executes the test function.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_testcase.js.source.html#line1075">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_ContinuationTestCase_Test.html">
              goog.testing.ContinuationTestCase.Test
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line480">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.prototype.error_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">error_</span>
        : 
     </div>


     <div class="entryOverview">
       The first error encountered during the test run, if any.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line514">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.prototype.setUp_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">setUp_</span>
        : 
     </div>


     <div class="entryOverview">
       The list of test steps to run during setUp.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line489">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.prototype.tearDown_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">tearDown_</span>
        : 
     </div>


     <div class="entryOverview">
       The list of test steps to run during the tearDown phase.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line503">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.prototype.test_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">test_</span>
        : 
     </div>


     <div class="entryOverview">
       The list of test steps to run for the actual test.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line496">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_TestCase_Test.html">
              goog.testing.TestCase.Test
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.testing.TestCase.Test.prototype.name"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">name</span>
        : 
     </div>


     <div class="entryOverview">
       The name of the test.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_testcase.js.source.html#line1056">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.testing.TestCase.Test.prototype.ref"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">ref</span>
        : 
     </div>


     <div class="entryOverview">
       Reference to the test function.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_testcase.js.source.html#line1062">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.testing.TestCase.Test.prototype.scope"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">scope</span>
        : 
     </div>


     <div class="entryOverview">
       Scope that the test function should be called in.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_testcase.js.source.html#line1068">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.ContinuationTestCase.Test.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ContinuationTestCase.Test.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_continuationtestcase.js.source.html#line480">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package testing.ContinuationTestCase</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="testing.ContinuationTestCase.Test"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
